package com.temi.demo.bean;

import android.support.annotation.NonNull;

import java.util.ArrayList;

/**
 * Created by coco on 2018/6/26.
 */

public class ContactsListResult {

    private ArrayList<ContactsData> list;

    public ArrayList<ContactsData> getList() {
        return list;
    }

    public static class ContactsData implements Comparable<ContactsData> {

        private int id;
        private String first_name;
        private String last_name;
        private String email;
        private String gender;
        private String phone;
        private String address;
        private String job;
        private String avatar;
        private String date;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getFirst_name() {
            return first_name;
        }

        public void setFirst_name(String first_name) {
            this.first_name = first_name;
        }

        public String getLast_name() {
            return last_name;
        }

        public void setLast_name(String last_name) {
            this.last_name = last_name;
        }

        public String getEmail() {
            return email;
        }

        public void setEmail(String email) {
            this.email = email;
        }

        public String getGender() {
            return gender;
        }

        public void setGender(String gender) {
            this.gender = gender;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getJob() {
            return job;
        }

        public void setJob(String job) {
            this.job = job;
        }

        public String getAvatar() {
            return avatar;
        }

        public void setAvatar(String avatar) {
            this.avatar = avatar;
        }

        public String getDate() {
            return date;
        }

        public void setDate(String date) {
            this.date = date;
        }

        @Override
        public int compareTo(@NonNull ContactsData o) {
            int i = -(int) (Long.parseLong(this.getDate()) - Long.parseLong(o.getDate()));
            return i;
        }
    }

}
